package com.crois.barrier.metrics.api;

/**
 * @author Hou Ze Yu
 * @description Metrics register.
 * @date 2021/4/22
 */
public interface MetricsRegister {
    /**
     * Register gauge.
     *
     * @param name  name
     * @param labelNames label names
     * @param document document for gauge
     */
    void registerGauge(String name, String[] labelNames, String document);

    /**
     * Register counter.
     *
     * @param name name
     * @param labelNames label names
     * @param document document for counter
     */
    void registerCounter(String name, String[] labelNames, String document);

    /**
     * Register histogram.
     *
     * @param name name
     * @param labelNames label names
     * @param document document for histogram
     */
    void registerHistogram(String name, String[] labelNames, String document);

    /**
     * Counter increment.
     *
     * @param name name
     * @param labelValues label values
     */
    void counterIncrement(String name, String[] labelValues);

    /**
     * Counter increment by count.
     *
     * @param name name
     * @param labelValues label values
     * @param count count
     */
    void counterIncrement(String name, String[] labelValues, long count);

    /**
     * Gauge increment.
     *
     * @param name name
     * @param labelValues label values
     */
    void gaugeIncrement(String name, String[] labelValues);

    /**
     * Gauge decrement.
     *
     * @param name name
     * @param labelValues label values
     */
    void gaugeDecrement(String name, String[] labelValues);

    /**
     * Record time by duration.
     *
     * @param name name
     * @param labelValues label values
     * @param duration duration
     */
    void recordTime(String name, String[] labelValues, long duration);
}
